<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@taglib prefix="mvc" uri="http://www.springframework.org/tags/form" %>
<%@taglib prefix="fmt" uri="http://www.springframework.org/tags" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>




<!DOCTYPE html>
<!--[if IE 6 ]> <html class="ie6 lte_ie6 lte_ie7 lte_ie8 lte_ie9"> <![endif]-->
<!--[if lte IE 6 ]> <html class="lte_ie6 lte_ie7 lte_ie8 lte_ie9"> <![endif]-->
<!--[if lte IE 7 ]> <html class="lte_ie7 lte_ie8 lte_ie9"> <![endif]-->
<!--[if lte IE 8 ]> <html class="lte_ie8 lte_ie9"> <![endif]-->
<!--[if lte IE 9 ]> <html class="lte_ie9"> <![endif]-->
<!--[if (gte IE 10)|!(IE)]><!--><html><!--<![endif]-->
<head>
    <title>员工离职详细信息</title>
    <meta http-equiv="Content-Type" content="text/html; charset=gbk" />
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=10,chrome=1" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
    <link rel="stylesheet" type="text/css" href="../../css/style.css" />
    <script type="text/javascript" src="../../js/jquery/jquery-1.9.1.js"></script>
    <script src="../../js/news/page.js"></script>
    <script src="../../lib/laydate/laydate.js"></script>
    <script src="../../js/base/base.js" type="text/javascript" charset="utf-8"></script>
    <script src="../../lib/pagination/js/jquery.pagination.min.js" type="text/javascript" charset="utf-8"></script>
    <link rel="stylesheet" type="text/css" href="../../css/news/new_news.css"/>

    <script type="text/javascript" >
        var MYOA_JS_SERVER = "";
        var MYOA_STATIC_SERVER = "";
    </script>
    <style>

        #rs {
            display: inline-block;
            float: left;
            width: 78px;
            height: 38px;
            line-height: 35px;
            /*  margin-right: 30px;*/
            margin-top: 20px;
            margin-bottom: 20px;
            cursor: pointer;
            border-radius: 3px;
            background: url(../../img/newReturn.png) no-repeat;
            padding-left: 19px;
            font-size: 14px;
            margin-left: 50%;

        }


    </style>


</head>


<%--<script type="text/javascript" src="/inc/js_lang.php"></script>--%>
<%--<script type="text/javascript" src="/static/js/attach.js"></script>--%>

<body class="bodycolor">
<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
    <tr>
        <td class="Big"><img src="../../img/contractinfo.png" width="17" height="17"><span class="big3">员工离职详细信息</span><br>
        </td>
    </tr>
</table>
<br>
<table class="TableBlock" width="90%" align="center">
    <tr>
        <td nowrap align="left" width="120" class="TableContent">姓名：</td>
        <td nowrap align="left" class="TableData userName" width="180"></td>
        <td nowrap align="left" width="120" class="TableContent">离职类型：</td>
        <td nowrap align="left" class="TableData quitType" width="180"></td>
    </tr>
    <tr>
        <td nowrap align="left" width="120" class="TableContent">担任职务：</td>
        <td nowrap align="left" class="TableData position" width="180"></td>
        <td nowrap align="left" width="120" class="TableContent">离职部门：</td>
        <td nowrap align="left" class="TableData deptName" width="180"></td>
    </tr>
    <tr>
        <td nowrap align="left" width="120" class="TableContent">申请日期：</td>
        <td align="left" class="TableData applicationDate" width="180"></td>
        <td nowrap align="left" width="120" class="TableContent">拟离职日期：</td>
        <td nowrap align="left" class="TableData quitTimePlan" width="180"></td>
    </tr>

    <tr>
        <td nowrap align="left" width="120" class="TableContent">实际离职日期：</td>
        <td nowrap align="left" class="TableData quitTimeFact" width="180"></td>
        <td nowrap align="left" width="120" class="TableContent">	工资截止日期：</td>
        <td align="left" class="TableData lastSalaryTime" width="180"></td>
    </tr>

    <tr>
        <td nowrap align="left" width="120" class="TableContent">去向：</td>
        <td align="left" colspan="3" class="TableData trace" width="180"></td>
    </tr>
    <tr>
        <td nowrap align="left" width="120" class="TableContent">离职手续办理：</td>
        <td align="left" colspan="3" class="TableData despacho" width="180"></td>
    </tr>
    <tr>
        <td nowrap align="left" width="120" class="TableContent">离职原因：</td>
        <td align="left" colspan="3" class="TableData quitReason" width="180"></td>
    </tr>
    <tr>
        <td nowrap align="left" width="120" class="TableContent">备注：</td>
        <td align="left" colspan="3" class="TableData remark" width="180"></td>
    </tr>
    <tr>
        <td nowrap align="left" width="120" class="TableContent">附件文档：</td>
        <td align="left" colspan="3" class="TableData fujian" width="180"></td>
    </tr>
    <%--<tr>--%>
        <%--<td nowrap align="left" width="120" class="TableContent">登记时间：</td>--%>
        <%--<td align="left" colspan="3" class="TableData registerTime" width="180"></td>--%>
    <%--</tr>--%>

    <%--<tr>--%>
        <%--<td nowrap align="left" width="120" class="TableContent">最后修改时间：</td>--%>
        <%--<td align="left" colspan="3" class="TableData lastmodifyTime" width="180"></td>--%>
    <%--</tr>--%>



    <tr align="center" class="TableControl">
        <td colspan="4">
            <%--   <input type="button" value="关闭" class="BigButton" onClick="window.close();" title="关闭窗口">--%>
            <div id="rs" type="save" class="btn_return"><fmt:message code="notice.th.return" /></div>
        </td>
    </tr>
</table>
</body>
<script>
    $(function(){
//        获取详情id
        var id=$.getQueryString('ids');

        $('#rs').click(function(){
            window.close();
        })

        $.ajax({
            url: "/hr/leave/leaveDetails",
            type: "get",
            data: {
                'leaveId': id
            },
            dataType: 'json',
            success: function (obj) {//回显数据
                var data=obj.object;


                var str1=""

                if (data.attachmentList != '' && data.attachmentList != undefined) {
                    var arr = data.attachmentList;

                    for (var i = 0; i < (arr.length); i++) {
                        str1+='<div class="dech" deUrl="'+encodeURI(arr[i].attUrl)+'" style="display:block;"><a class="ATTACH_a" NAME="'+arr[i].attachName+'*" href="<%=basePath %>download?'+encodeURI(arr[i].attUrl)+'">'+arr[i].attachName+'</a><input type="hidden" NAME="'+arr[i].attachName+'*"  class="inHidden" value="'+arr[i].aid+'@'+arr[i].ym+'_'+arr[i].attachId+',"></div>';
                    }
                    $('.fujian').append(str1);
                };



                if(data.userName){
                    $('.userName').html(data.userName);/*姓名*/
                }else {
                    var ll = '(<span style="color: red;">用户已删除</span>)'
                    $('.userName').html(ll);/*姓名*/

                }
                $('.quitType').html(data.quitType);
                $('.applicationDate').html(data.applicationDate);
                $('.quitTimePlan').html(data.quitTimePlan);
                $('.academic').html(ss(data.academic));/**/
                function ss (d) {
                    switch(d)
                    {
                        case '':
                            return ' '
                            break;
                        case '1':
                            return '小学'
                            break;
                        case '2':
                            return '初中'
                            break;
                        case '3':
                            return '高中'
                            break;
                        case '4':
                            return '中专'
                            break;
                        case '5':
                            return '大专'
                            break;
                        case '6':
                            return '本科'
                            break;
                        case '7':
                            return '研究生'
                            break;
                        case '8':
                            return '博士'
                            break;
                        case '9':
                            return '博士后'
                            break;
                        case '10':
                            return '技校'
                            break;
                        default:
                            return ' '

                    }
                }
                $('.degree').html(xx(data.degree));
                function xx(d) {
                    switch(d)
                    {
                        case '':
                            return ' '
                            break;
                        case '1':
                            return '博士后'
                            break;
                        case '2':
                            return '博士'
                            break;
                        case '3':
                            return 'MBA'
                            break;
                        case '4':
                            return '硕士'
                            break;
                        case '5':
                            return '双学士'
                            break;
                        case '6':
                            return '学士'
                            break;
                        case '7':
                            return '无'
                            break;
                        default:
                            return ' '
                    }
                }
                $('.quitTimeFact').html(data.quitTimeFact);
                $('.lastSalaryTime').html(data.lastSalaryTime);
                $('.trace').html(data.trace);

                $('.despacho').html(data.despacho);
                $('.quitReason').html(data.quitReason);
                $('.certificate').html(data.certificate);

                $('.remark').html(data.remark);
                $('.deptName').html(data.deptName);
                $('.position').html(data.position);

            }
        })
    })
</script>
</html>


